<?php
/**
 * Created by PhpStorm.
 * User: HVAI
 * Date: 2018/4/1
 * Time: 21:54
 */

namespace app\api\controller;


use app\api\logic\companyLogic;

class Company
{


    public function get(){
        $companyLogic = new companyLogic();
        $res = $companyLogic->get();
        return json($res);

    }

    public function getList(){
        $companyLogic = new companyLogic();
        $page = 1;
        $res = $companyLogic->getList($page);
        return json($res);
    }

    /**
     * 创建
     */
    public function create(){
        $companyLogic = new companyLogic();
        $data = array();
        $res = $companyLogic->save($data);
        return json($res);

    }
    public function update(){
        $companyLogic = new companyLogic();
        $data = array();
        $res = $companyLogic->save($data);
        return json($res);

    }
    public function delete(){
        $companyLogic = new companyLogic();
        $id = 'ffb95ce72cd0e3536b18efd9b0ba810';
        $res = $companyLogic->delete($id);
        return json($res);

    }

    public function text(){
        $companyLogic = new companyLogic();
        $res = $companyLogic->text();
        return json($res);
    }
}